[bits 32]
section .text    ;code section
global switch_to
switch_to:
push esi
push edi
push ebx
push ebp

mov eax, [esp + 20]  
mov [eax], esp

;----------up:backup current thread----------;

;----------down:recover next thread----------;
mov eax, [esp + 24]
mov esp, [eax]

pop ebp
pop ebx
pop edi
pop esi
ret
